
<HTML>

<HEAD><TITLE>PerlScript Welcome Sample</TITLE></HEAD>

<!-- 
	ActiveState PerlScript sample 
	PerlScript:  The easiest, most powerful way to program custom web solutions. 
-->

<BODY BGCOLOR=#FFFFFF>

<!-- Table A - Page heading including masthead -->
<TABLE CELLPADDING=0 BORDER=3 CELLSPACING=0>
<TR VALIGN=TOP ><TD>
<A NAME="TOP"><IMG SRC="PSBWlogo.gif" WIDTH=400 HEIGHT=48 ALT="The power of PerlScript!" BORDER=2></A><P>
</TD></TR></TABLE>

<hr>
<BR>
<FONT SIZE=5>

<SCRIPT language="PerlScript">

sub PrintWelcome {	
	($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime();
	$thisday=(Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday)[$wday];
	$thismon=(January,February,March,April,May,June,July,August,September,October,November,December)[$mon];
	if ($hour < 12) {
		$window->document->write( "Good morning!  ");
	} elsif ($hour < 17) {
		$window->document->write( "Good afternoon!  ");
	} else {
		$window->document->write( "Good evening!  ");
	};
	$ampm = 'AM';
	if ($hour > 12) {
		$hour-=12;
		$ampm = 'PM';
		}
	$time = sprintf '%d:%2.2d:%2.2d',$hour,$min,$sec;
	$year += 1900;
	$datetime = $time.' '.$ampm.', '.$thisday.', '.$thismon.' '.$mday.', '.$year;		
	$window->document->write("Welcome to the world of PerlScript.<BR>  ");
	$window->document->write("Just in case you were wondering, it's<BR> "); 
	$window->document->write($datetime);
}

PrintWelcome();

</SCRIPT>
</FONT>
<P>
<FONT SIZE=2>
<hr>
If this sample doesn't work, download <A HREF="http://www.microsoft.com/ie/">Internet Explorer 3.0</A> now.
</FONT>

<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 width=600>
<TR VALIGN=TOP>
	<TD ALIGN=RIGHT>
	<FONT FACE="Arial, Helvetica" SIZE="1">
	<B>Best experienced with<BR> 
	<A HREF="http://www.microsoft.com/ie/" TARGET="_top"><img src="ie_animated.gif" width="88" height="31" border="0" alt="Microsoft Internet Explorer" vspace="5"></a>
	<BR>Click here to start.</B>
	</FONT></TD>
</TR>
</TABLE>

</BODY>
</HTML>


